<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
	<script type="text/javascript" src="$url.base/static/jquery-1.3.2.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="$url.base/static/json.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="$url.base/static/forum.js" charset="utf-8"></script>
	<script type="text/javascript" src="$url.base/static/thickbox.js" charset="utf-8"></script>
	<script type="text/javascript" src="$url.base/static/jquery.anchor.js" charset="utf-8"></script>
<script type="text/javascript" src="$url.base/static/xheditor/xheditor-1.1.8-zh-cn.min.js"></script>
<script type="text/javascript" src="$url.base/static/xheditor/xheditor_plugins/ubb.min.js"></script>
<link type="text/css" href="$url.base/static/discuz/main.css" rel="stylesheet"/>
</head>
#set($canManage = $model.permission.canManage($category))
<body>
<div id="home">
	#parse("discuz/_header.htm")

	<div class="thread-list">
    	<table cellspacing="0" cellpadding="0">
    	#foreach($item in $topicInfoList)
        	<tr #if($foreach.count==$topicInfoList.size())class="last"#end>
            	<td class="icon">
                <a target="_blank" title="新窗口打开" href="$url.topic($item)">
                	#if($item.widgetType==1)
					<img src="$url.base/static/discuz/pollsmall.gif"/>
					#elseif($item.top)
					<img src="$url.base/static/discuz/pin_1.gif"/>
					#else
					<img src="$url.base/static/discuz/folder_new.gif"/>
					#end
				</a>
                </td>
                <td>
                	#if($canManage)
                	<input type="checkbox" name="selectTopic" value="$item.id"/>
                	#end
                	<a href="$url.topic($item)">$item.title</a>
                	#if($item.digest)
                	<img src="$url.base/static/discuz/digest_1.gif"/>
					#end
					#if($item.top)
					&nbsp;<a href="javascript:forum.op.rollTopRank($item.id)">提升</a>
					#end
				</td>
                <td class="by">
					<cite>
						#if($item.authorId==1)
							$item.authorNickame
						#else
							<a href="$url.base/member/$item.authorId/profile">$item.authorNickame</a>
						#end
					</cite>
					<em><span style="color:#F26C4F">$utils.dateFormat("yyyy-M-d",$item.lastReplyDate)</span></em>
				</td>
                <td class="num">
					<em style="color: #336699;">$item.replyCount</em><em>$item.viewCount</em>
                </td>
                <td class="by">
					<cite>
						#if($item.lastReplierId==1)
							$item.lastReplierNickname
						#else
							<a href="$url.base/member/$item.lastReplierId/profile">$item.lastReplierNickname</a>
						#end
					</cite>
					<em>$utils.dateFormat($item.lastReplyDate)</em>
                </td>
            </tr>
		#end
		#if($canManage)
			<tr style="background:#E8F3FD">
				<td></td>
				<td colspan=4>
					<input type="checkbox" onclick="$('input[name=selectTopic]').click()"/>反选
					<button onclick="forum.op.deleteSubject()">删除主题</button>
					<button onclick="forum.op.moveSubject(1,this)">移动主题</button>
					<button onclick="forum.op.topSubject()">置顶/解除置顶</button>
					<button onclick="forum.op.digestSubject()">加入/解除精华</button>
				</td>
			</tr>
		#end
        </table>
    </div>
    
	#parse("discuz/_pagination.htm")
		<div class="topic_form">
			<h4>快速发帖</h4>
			<div class="wrapper">
			<form id="subjectForm" action="$url.base/topic" method="post">
			<table>
				<tr>
					<td valign="top">
					#set($children=$category.children)
					#if($children.size()>0)
						<select class="select-category" autocomplete="off" style="height:24px;vertical-align:top;font-size:14px;border:solid 1px #CDCDCD">
							<option selected="selected" value="0">...</option>
							#foreach($child in $children)
							<option value="$child.id">$child.name</option>
							#end
						</select>
					#else
						<select class="select-category" style="display:none">
							<option value="$category.id">$category.name</option>
						</select>
					#end
					<input name="title" type="text" class="text-input" style="width:425px"/>
					</td>
					<td>
					</td>
				</tr>
				<tr>
					<td>
					<div class="editor">
						<textarea id="topic_content" style="width:680px;height:150px;" name="content"></textarea>
					</div>
					</td>
					<td> </td>
				</tr>
				<tr>
					<td>
						<button class="pn" style="margin-top:5px;" type="submit"><strong>发表帖子</strong></button>
					</td>
					<td> </td>
				</tr>
			</table>
			</form>
			</div>
		</div>
<script type="text/javascript">
$('input[name=title]').attr("autocomplete","off");
var editor;
$(pageInit);
function pageInit()
{
	editor= $('#topic_content').xheditor({
		skin:'nostyle',
		tools:'Fullscreen,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,Removeformat,|,Align,Img,Emot,Link,Unlink,SelectAll,Pastetext,Source',
		html5Upload:false,
		upImgUrl:"$url.base/xheditor/upload",
		upImgExt:"jpg,jpeg,gif,png",
		showBlocktag:false,
		forcePtag:false,
		beforeSetSource:ubb2html,
		beforeGetSource:html2ubb,
		emotMark:true,
		shortcuts:{'ctrl+enter':submitForm}
	});
}
function submitForm(){$('#subjectForm').submit();}
</script>
	#parse("discuz/_footer.htm")
</div>
</body>
</html>
